/**
 * 
 */
package pl.edu.mimuw.irs.core.model.design.net.refinement;

import java.util.Collections;
import java.util.List;

import pl.edu.mimuw.irs.core.model.design.net.IRSNode;

/**
 * @author Jakub Rauch
 * Created on: 2010-02-28
 */
public class IRSNoneChildren extends IRSAbstractChildren {

	private static final long serialVersionUID = -2819098174046996101L;
	
	// *** Attributes
	
	// *** Constructors

	/**
	 * General constructor. It is an application of the NONE refinement pattern to given node. This node will have
	 * no children at all.
	 */
	public IRSNoneChildren(IRSNode node) {

		super(node);

		/** Finalizing the construction */
		initChildren();
	}
	
	/**
	 * Copying constructor.
	 */
	public IRSNoneChildren(IRSNoneChildren children) {
		super(children);

		/** Finalizing the construction */
		initChildren();
	}

	// *** Methods
	
	public Refinement getRefinement() {
		return Refinement.NONE;
	};
	
	private void initChildren() {
		List<IRSNode> nodes = Collections.emptyList();
		setAllChildren(nodes);
		setInputChildren(nodes);
		setOutputChildren(nodes);
	}
	
	@Override
	public IRSNoneChildren clone() {
		return new IRSNoneChildren(this);
	}
}
